const express = require('express')
const router = express.Router()
const Goods = require('../db/goods')
//详情页数据
router.get('/api/goods/id', (req, res) => {
  let id = req.query.id
  Goods.find({
    id: id
  }).then(data => {
    res.send({
      code: 0,
      data: data[0]
    })
  })
})
module.exports = router
